home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.4 KB | 98 lines | [TEXT/GEOL] |
- Item 7757614 19-Sept-88 11:21
-
- From: D0795 Double Centre Surveying, Dev
-
- To: D1032 Softview, Dev, Ron Breger
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Response to How to hier-menus?
-
- Leslie R. Lee, SoftView, Inc.
- D1032
-
- Leslie,
-
- The only difference is in the resource file actually. I am providing pieces
- only. You should be able to get the idea here or look at demoText. This rsrc is
- for use in a 1.1.1 program but should work fine in a 2.xxbx program.
-
- You must first tell rez and postRez that it is going to be hier:
-
- resource 'cmnu' (4) {
- 4,
- textMenuProc,
- allEnabled,
- enabled,
- "Design",
- { /* array: 4 elements */
- /* [1] */
- "Points", noIcon, parent, "\0x13"/*19 hex*/, plain, 1905; /* cPointSubMenu *
- /* [2] */
- "Lines", noIcon, parent, "\0x14"/*20 hex*/, plain, 1906; /* cLineSubMenu */
- /* [3] */
- "Curves", noIcon, parent, "\0x15"/*21 hex*/, plain, 1907; /* cCurveSubMenu *
- /* [4] */
- "Boundaries", noIcon, parent, "\0x16"/*22 hex*/, plain, 1908; /*
- cBoundarySubMenu */
- /* [5] */
- "Display angle…", noIcon, "B", noMark, plain, 1620
- }
- };
-
- I defined parent as follows:
- /* parent of a sub-menu */
- #define parent "\0x1B"
-
- Then you must supply the submenu:
- resource 'cmnu' (20) {
- 20,
- textMenuProc,
- allEnabled,
- enabled,
- "Lines",
- { /* array: 4 elements */
- /* [1] */
- "Connect with line", noIcon, "L", noMark, plain, 1458;
- /* [2] */
- "Reverse direction", noIcon, "R", noMark, plain, 1483; /* cSwapLineEndpoint
- /* [3] */
- "Line thickness…", noIcon, noKey, noMark, plain, 1482; /*
- cChangeLineCurveDrawThickness*/
- /* [4] */
- "Make default line", noIcon, noKey, noMark, plain, 1612
- /*cMakeThisTheDefaultLine*/
- }
- };
-
- Then you must tell it how your MenuBar is to be setUp:
-
- /* Menu bar for a non-color system */
- resource 'MBAR' (131) {
- {1; 2; 3; 4; 5; 6; 7; 30; 31}
- };
-
- /* Menu bar for a non-color system */
- resource 'MBAR' (132) {
- {1; 2; 3; 4; 5; 6; 7; 30}
- };
-
- /* Dynamic menus */
- resource 'MBAR' (129) {
- {32 }
- };
-
- /* Hierarchial Sub-Menus */
- resource 'MBAR' (130) {
- {11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22}
- };
-
- This previous step is the most likely forgotten. Also, don't forget to enable
- its items individually. Nothing special here.
-
- Good luck,
-
- John D. Olsen, RPS
-
-
-